<% if @fix && @fix.value?(true) %>
  <h1>Please review your configuration</h1>
  <div style="margin: 100px">
    <% if @fix[:ssl] %>
      <h2>SSL</h2>
      <p>For security reasons you need to use SSL. SSL is not configured, please review your server configuration.</p>
    <% end %>
    <% if @fix[:secret_key_base] %>
      <h2>Fix secret key base</h2>
      <p>For security reasons you need to set a <i>secret_key_base</i>. You have a default value and this is not safe. Run:</p>
      <p><i> rake secret</i></p>
      to generate a new secret, and then
      <% if Rails.env.production? %>
        set the <i>PORTUS_SECRET_KEY_BASE</i> environment variable to this value.
      <% else %>
        set <i>secret_key_base</i> to this value in <i>config/secret.yml</i>.
      <% end %>
      </p>
    <% end %>
    <% if @fix[:secret_machine_fqdn] %>
      <h2>Fix secret machine fqdn value</h2>
      You need to set the machine fdqn value for Portus to work. In order to do this, you have to set the <i>machine_fqdn</i> value in <i>config/config-local.yml</i>.
    <% end %>
    <% if @fix[:secret_encryption_private_key_path] %>
      <h2>Fix secret encryption private key path value</h2>
      You need to set the secret encryption private key path value for Portus to work.
      <% if Rails.env.production? %>
        Set the <i>PORTUS_KEY_PATH</i> environment variable.
      <% else %>
        Set <i>encryption_private_key_path</i> in <i>config/secrets.yml</i>.
      <% end %>
    <% end %>
    <% if @fix[:secret_portus_password] %>
      <h2>Fix secret portus password</h2>
      You need to set the password for the internal Portus user.
      <% if Rails.env.production? %>
        Set the <i>PORTUS_PASSWORD</i> environment variable.
      <% else %>
        Set <i>portus_password</i> in <i>config/secrets.yml</i>.
      <% end %>
    <% end %>
    <% if @fix[:database] %>
      <h2>Database</h2>
      <p>We cannot access the database.
      <% if Rails.env.production? %>
        Please set the following environment variables:
        <ul>
          <li>PORTUS_PRODUCTION_USERNAME</li>
          <li>PORTUS_PRODUCTION_PASSWORD</li>
          <li>PORTUS_PRODUCTION_HOST</li>
          <li>PORTUS_PRODUCTION_DATABASE</li>
        </ul>
      <% else %>
        Please review <i>config/database.yml</i> file.
      <% end %>

    <% end %>
  </div>
<% else %>
  If you are the application owner check the logs for more information.
<% end %>
